# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-jaraco.path
pkgver=3.7.2
pkgrel=0
pkgdesc="Cross platform hidden file detection"
url="https://github.com/jaraco/jaraco.path"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-installer py3-setuptools_scm py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jaraco/jaraco.path/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/jaraco.path-$pkgver"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
df87e6d49bee0652f664ea5413631069003ce18e86e93f1f5e3f829c0da41e53399a265b70ff5d69f85e5c49da17e9bc9dd768c7b205db3b3fdc52330df6a975  py3-jaraco.path-3.7.2.tar.gz
"
